-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hyperlane types #1358
Fix hyperlane types #1358
Conversation
* fix hyperlane gas tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending commentary from the @'d parties
, (FieldKey "originDomain", tTyInteger) | ||
, (FieldKey "destinationDomain", tTyInteger) | ||
, (FieldKey "recipient", tTyString) | ||
, (FieldKey "tokenMessage", tTyObject (TyUser (snd tokenMessageERC20Schema))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm @chessai or @edmundnoble should this or should this not contain a chainId
field?
"hyperlane-message-id" | ||
hyperlaneMessageId' | ||
(funType tTyString [("x", tTyObjectAny)]) | ||
(funType tTyString [("x", tTyObject ty)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to amend these docs too.
hyperlaneMessageIdDef = defGasRNative | ||
tokenMessageERC20Schema :: NativeDef | ||
tokenMessageERC20Schema = defSchema "hyperlane-token-erc20" | ||
"Schema type for ERC20 TokenMessage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of TokenMessage
are we referring to here? If it's hyperlane specific it needs to mention this in the docs.
|
||
|
||
hyperlaneMessageIdDef :: Type (Term Name) -> NativeDef | ||
hyperlaneMessageIdDef ty = defGasRNative | ||
"hyperlane-message-id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment needs work.
hyperlaneDecodeTokenMessageDef :: NativeDef | ||
hyperlaneDecodeTokenMessageDef = | ||
hyperlaneDecodeTokenMessageDef :: Type (Term Name) -> NativeDef | ||
hyperlaneDecodeTokenMessageDef schematy = | ||
defGasRNative | ||
"hyperlane-decode-token-message" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
Drafting until I receive some feedback on the hyperlane msg format |
closed for #1362 |
Fixes our hyperlane type definitions to include the correct type schemas, as well as exporting schemas for hyperlane definitions
That is, we go from:
to
As well as exporting the two necessary schemas:
PR checklist:
cabal run tests
. If they pass locally, docs are generated.Additionally, please justify why you should or should not do the following: